package io.yuanqi.hgtcshop.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import io.yuanqi.hgtcshop.entity.dos.Member;
import io.yuanqi.hgtcshop.entity.security.Token;
import io.yuanqi.hgtcshop.entity.security.user.ConnectAuthUser;
import io.yuanqi.hgtcshop.entity.vo.MemberVO;

import java.util.List;
import java.util.Map;

/**
 * 会员业务层
 *
 * @author Bulbasaur
 * @since 2020-02-25 14:10:16
 */
public interface MemberService extends IService<Member> {
    /**
     * 默认密码
     */
    static String DEFAULT_PASSWORD = "111111";

    /**
     * 通过手机获取用户
     *
     * @param mobile 手机号
     * @return 操作状态
     */
    Member findByMobile(String mobile);

    boolean findByMobile(String uuid, String mobile);


    /**
     * 注册会员
     *
     * @param userName    会员
     * @param password    密码
     * @param mobilePhone mobilePhone
     * @return 处理结果
     */
    Token register(String userName, String password, String mobilePhone);


    /**
     * 注册会员
     *
     * @param userName    会员
     * @param password    密码
     * @param mobilePhone mobilePhone
     * @param face 头像
     * @param openId
     * @return 处理结果
     */
    Token register(JSONObject resultObj);

    Member findByMemberId(String memberId);

    Member findByOpenId(String openId);
}